<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>订单列表-{$tpshop_config['shop_info_store_title']}</title>
    <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />

</head>

<body class="vip_index">
<!--------头部开始-------------->
<include file="Public/header" />
<!--------头部结束-------------->
<link rel="stylesheet" href="/Template/pc/kty/Static/css/all_orders.css"/>

<div class="savek">
        <include file="User/menu" />

        <div class="ddl">
            <div class="gg">
                <a href="{:U('Home/User/order_list')}">
                    <h3 class="dfk  <if condition='$active_status eq ""'>thisactive</if>" id="sydd">所有订单</h3>
                </a>
                <a href="{:U('Home/User/order_list',array('type'=>'WAITPAY'))}">
                    <h3 class="dfk <if condition='$active_status eq "WAITPAY"'>thisactive</if>" id="dfka">待付款({$order_type_counts['WAITPAY']})</h3>
                </a>
                <a href="{:U('Home/User/order_list',array('type'=>'WAITSEND'))}">
                    <h3 class="dfk <if condition='$active_status eq "WAITSEND"'>thisactive</if>" id="dfh">待发货({$order_type_counts['WAITSEND']})</h3>
                </a>
                <a href="{:U('Home/User/order_list',array('type'=>'WAITRECEIVE'))}">
                    <h3 class="dfk <if condition='$active_status eq "WAITRECEIVE"'>thisactive</if>" id="dsh">待收货({$order_type_counts['WAITRECEIVE']})</h3>
                </a>
                <a href="{:U('Home/User/order_list',array('type'=>'WAITCCOMMENT'))}">
                    <h3 class="dfk <if condition='$active_status eq "WAITCCOMMENT"'>thisactive</if>" id="dpj">待评价({$order_type_counts['WAITCCOMMENT']})</h3>
                </a>
                <div class="ftl yz"></div>
            </div>
            <div class="kuang2">
                <p style="margin-left: 20px">产品</p>  <p style="margin-left: 410px">单价</p>  <p style="margin-left: 85px">数量</p>  <p style="margin-left: 94px">实付款</p>
                <p style="margin-left: 85px">状态</p> <p style="margin-left: 99px">操作</p>
            </div>
            <volist name="lists" id="list">
               <div class="spkuang">
                   <p class="time">{$list.add_time|date='Y-m-d',###}</p>
                   <p class="ddh">订单号：<span>{$list.order_sn}</span></p>
               </div>
               <volist name="list.goods_list" id="good" offset="0" length='1'>
                    <div class="cpk">
                        <a href="{:U('Home/Goods/goodsInfo',array('id'=>$good['goods_id']))}">
                            <img class="spimg" src="{$good.goods_id|goods_thum_images=83,83}" alt="">
                        </a>
                        <a href="{:U('Home/Goods/goodsInfo',array('id'=>$good['goods_id']))}">
                            <p class="sptitle">{$good.goods_name} </p>
                        </a>
                        <span class="spzs">{$good.goods_remark|getSubstr=0,100}</span>
                        <h3 class="spprice">￥{$good.member_goods_price}</h3>
                        <p class="spprice1">￥{$good.goods_price}</p>
                        <h3 class="number">{$good.goods_num}</h3>
                        <h3 class="allprice">￥{$good['goods_num'] * $good['member_goods_price']}</h3>
                        <if condition="$list['shipping_price'] gt 0">
                          <span class="yf">（含运费￥{$list['shipping_price']}）</span>
                        </if>
                        <h3 class="dfh">{$list['order_status_desc']}</h3>
                        <a href="{:U('Home/User/order_detail',array('id'=>$list['order_id']))}"><span class="klddxq">订单详情</span></a>
                        <if condition="$list.receive_btn eq 1">
                            <a href="javascript:;" onclick="if(confirm('你确定收到货了吗?')) location.href='{:U('Home/User/order_confirm',array('id'=>$list['order_id']))}'">
                              <div class="ljfk">收货确认</div>
                            </a>
                        </if>
                        <if condition="$list.pay_btn eq 1">
                            <a href="{:U('/Home/Cart/cart4',array('order_id'=>$list[order_id]))}"><div class="ljfk">立即付款</div></a>
                        </if>
                        <if condition="($list[comment_btn] eq 1) and ($good[is_comment] eq 0)">
                            <a href="{:U('Home/User/comment')}"><div class="ljfk">评价</div></a>
                        </if>
                        <if condition="$list.cancel_btn eq 1">
                          <a href="javascript:cancel_order({$list.order_id});"><span class="qxdd">取消订单</span></a>
                        </if>
                   </div>
               </volist>
           </volist>
           <div class="fenye" style="width: 1019px; float: initial;">
            <div class="fykuang">
              {$page}
            </div>
          </div>
        </div>
</div>


<!--------footer-开始-------------->
<include file="Public/footer" />
<!--------footer-结束-------------->


</body>
<script>
    //取消订单
    function cancel_order(id){
        if(!confirm("确定取消订单?"))
            return false;
        location.href = "/index.php?m=Home&c=User&a=cancel_order&id="+id;
    }
</script>
</html>